package com.key.web_admin.controller;

import com.key.modules.service.FirstPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author：朕
 * @Package：com.key.web_admin.controller
 * @Project：logistics_system
 * @name：FirstPageController
 * @Date：2023/3/23 20:32
 * @Filename：FirstPageController
 */
@RestController
@RequestMapping("/firstPage")
public class FirstPageController {

    @Autowired
    private FirstPageService firstPageService;

    /**
     * 查询今日订单总数
     */
    @GetMapping("/findIndentQuantityByToday")
    public Integer findIndentQuantityByToday(){
        return firstPageService.findIndentQuantityByToday();
    }

    /**
     * 查询运单总额
     */
    @GetMapping("/findWaybillMoneyByToday")
    public Integer findWaybillMoneyByToday(){
        return firstPageService.findWaybillMoneyByToday();
    }

    /**
     * 查询今日支出总额
     */
    @GetMapping("/findPayMoneyByToday")
    public Integer findPayMoneyByToday(){
        return firstPageService.findPayMoneyByToday();
    }

    /**
     * 根据日期查询订单数量
     */
    @GetMapping("/findIndentQuantityByDate")
    public List<Integer> findIndentQuantityBy(){
        return firstPageService.findIndentQuantityByDate();
    }

    /**
     * 根据日期查询车次数量
     */
    @GetMapping("/findVehicleNumberTimeByDate")
    public List<Integer> findVehicleNumberTimeByDate(){
        return firstPageService.findVehicleNumberTimeByDate();
    }

}
